package com.molihub.service.impl;

import com.molihub.entity.ArticleComment;
import com.molihub.entity.ArticleCommentToShow;
import com.molihub.service.ArticleCommentService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: ArticleCommentServiceImpl
 * @Description: TODO
 * @author: GGBOY
 * @date 2020/2/14 19:39
 * @Version: 1.0
 **/
@Service
public class ArticleCommentServiceImpl extends BaseService implements ArticleCommentService {
    @Override
    public Integer getArticleTotalCommentCount(Integer articleId) {
        return articleCommentMapper.getArticleTotalCommentCount(articleId);
    }

    @Override
    public List<ArticleCommentToShow> getCommentsByArticleId(Integer articleId) {
        return articleCommentMapper.getCommentsByArticleId(articleId);
    }

    @Override
    public Integer addCommentRecord(ArticleComment articleComment) {
        return articleCommentMapper.addCommentRecord(articleComment);
    }

    @Override
    public String getArticleCommentContentByCommentId(Integer commentId) {
        return articleCommentMapper.getArticleCommentContentByCommentId(commentId);
    }
}
